#include "button_home_miusic.h"

button_home_miusic::button_home_miusic(QWidget *parent) : Button_Cust_Base(parent)
{
    // 初始化状态
    this->start = false;
}

void button_home_miusic::mousePressEvent(QMouseEvent *event)
{
    // 不使用这个变量
    Q_UNUSED (event);
    event->source();

    // 当按钮按下 则切换状态
    if(this->start == true)
    {
        // 切换状态
        this->start = false;
    }
    else
    {
        // 切换状态
        this->start = true;
    }
    // 发送信号
    emit signals_start(start);
}

void button_home_miusic::set_start(bool start)
{
    this->start = start;
}
